<?=view('header.html')?>
<body class="layui-view-body">

    <div class="layui-content">
        <div class="layui-row layui-col-space20">

        	<div class="layui-card">
        		<div class="layui-card-header">
        			<blockquote class="layui-elem-quto">
		        		缓存更新完成之后，请按F5刷新整个页面。
		        	</blockquote>
        		</div>
        		<div class="layui-card-body">
        			<table class="layui-table" id="ams_result">
						{loop $list $id $t}
						{if $id%3==0}<tr>{/if}
							<td width="200" align="left">
								{$t.name}
								&nbsp;&nbsp;
								<span id="ams_cache_{$id}"><i class="layui-icon layui-icon-loading"></i></span>
							</td>
						{if $id%3==2}</tr>{/if}
						{/loop}
					</table>
        		</div>
        	</div>
        	
        </div>
    </div>
<?=view('footer.html')?>
<script type="text/javascript">
	{loop $list $id $t}
	$.ajax({
		type: "GET",
		url: "{$t.url}&"+Math.random(),
		contentType: "application/json; charset=utf-8",
		dataType: "text",
		success: function (data) {
			$("#ams_cache_{$id}").html('<i class="layui-icon layui-icon-ok"></i>');
		},
		error: function(HttpRequest, ajaxOptions, thrownError) {
			$("#ams_cache_{$id}").html('<i style="color:red;" class="layui-icon layui-icon-close"></i>');
			$("#ams_cache_{$id}").parent('td').attr('style', 'color:red');
		}
	});
	{/loop}
	$.get("{url('home/clear')}&"+Math.random(), function(){});
</script>
</body>
</html>